﻿using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Lucy.Engine.Framework
{
    public class GameSystem : PropertyObject
    {
        public List<Scene> Scenes { get; private set; }
        public Scene CurrentScene { get; set; }

        public GameSystem()
        {
            Scenes = new List<Scene>();
            Scenes.Add(new Scene());
            CurrentScene = Scenes[0];
            CurrentScene.AddLayer(new Layer("Layer1"));
        }

        public void Update(GameTime time)
        {
            float elapsed = time.ElapsedGameTime.Milliseconds*0.001f;
            CurrentScene.Update(elapsed);
        }

        public void Render(SpriteBatch spriteBatch)
        {
            CurrentScene.Render(spriteBatch);
        }

        public override IEnumerable<string> GetProperties()
        {
            yield return null;
        }

        public override void SetValue(string propertyName, string value)
        {
        }

        public override string GetValue(string propertyName)
        {
            return string.Empty;
        }
    }
}
